package com.itheima.thread04;

//测试类
public class Demo {
    public static void main(String[] args) {
        //为保证锁唯一，在测试类中创建Desk对象
        Desk desk = new Desk();

        //将同一个对象传入这两个线程对象中
        Cooker c= new Cooker(desk);
        Foodie f = new Foodie(desk);

        Thread t1 = new Thread(c);
        Thread t2 = new Thread(f);

        t1.start();
        t2.start();
    }
}
